import { defineStore } from "pinia";
import { ref, computed } from "vue";
export const useCounterStore = defineStore("counter", () => {
  const count = ref(0);
  const name = ref("Eduardo");
  const isAdmin = ref(true);
  const increment = () => {
    count.value++;
  };
  const doubleCount = computed(() => {
    return count.value * 2;
  });

  return {
    count,
    name,
    isAdmin,
    increment,
    doubleCount,
  };
});
